# -*- coding: utf-8 -*-
'''
@File: execel_data.py
@Time: 2023/5/7 22:55
@Author: sunda
'''
import openpyxl

def get_excel(path):
    # path = "D:/python/work/Website/app/static/file/模板.xlsx"
    data = openpyxl.load_workbook(path)
    table = data.active
    data=[]
    for i in range(2, 10):
        if table.cell(i, 1).value:
            data.append([
                table.cell(i, 1).value,
                table.cell(i, 2).value.strftime('%m-%d'),
                table.cell(i, 3).value,
                table.cell(i, 4).value])
    return data

if __name__ == '__main__':
    print(get_excel())


